package org.zhouhe.modules.website;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.zhouhe.base.BaseAction;
import org.zhouhe.modules.servingProcess.service.ServingProcessService;
import org.zhouhe.vo.ServingProcess;

public class ServingProcessAction extends BaseAction {

	private static final long serialVersionUID = 896164905733014622L;
	private ServingProcess servingProcess = new ServingProcess();
	private List<ServingProcess> servingProcessList = new ArrayList<ServingProcess>();
	@Autowired
	private ServingProcessService servingProcessService;
	public String list(){
		servingProcessList = servingProcessService.getServingProcessList();
		this.setPageTitle("服务项目");
		return "list";
	}
	
	public String detail(){
		servingProcess = servingProcessService.getServingProcess(getServingProcess().getServingProcessId());
		this.setPageTitle(servingProcess.getTitle()+ " - 服务项目");
		return "detail";
	}

	public void setServingProcessList(List<ServingProcess> servingProcessList) {
		this.servingProcessList = servingProcessList;
	}

	public List<ServingProcess> getServingProcessList() {
		return servingProcessList;
	}

	public void setServingProcess(ServingProcess servingProcess) {
		this.servingProcess = servingProcess;
	}

	public ServingProcess getServingProcess() {
		return servingProcess;
	}
}
